import { Controller, Get, UseGuards, Param } from '@nestjs/common';
import { CourseContentService } from './content.service';
import { AuthGuard } from '../guards/auth.guard';
import { User, userType } from "../user/user.decorators";

@Controller('course-content')
export class CourseContentController {
  constructor(private readonly CourseContentService: CourseContentService) {}
  @Get('/:id/:type')
  @UseGuards(AuthGuard)
  getContent( 
    @Param("id") id: string,
    @Param("type") type: string,
    @User() user: userType,
 ) {
  return   this.CourseContentService.getContent(id,type);
}
}
